diff options
| author | Fuwn <[email protected]> | 2024-01-19 00:26:17 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-19 00:26:17 -0800 |
| commit | 20fafa287adec1382257622fc23bd6f58b09f3a2 (patch) | |
| tree | 863f09c3dc86e9a50ba4b0c4433d4ef7cd4ab3c1 /src/routes/tools/[tool] | |
| parent | fix(schedule): force list mode flag column count (diff) | |
| download | due.moe-20fafa287adec1382257622fc23bd6f58b09f3a2.tar.xz due.moe-20fafa287adec1382257622fc23bd6f58b09f3a2.zip | |
feat: root prefix all links
Diffstat (limited to 'src/routes/tools/[tool]')
| -rw-r--r-- | src/routes/tools/[tool]/+page.svelte | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/routes/tools/[tool]/+page.svelte b/src/routes/tools/[tool]/+page.svelte index adcd6442..945acbd4 100644 --- a/src/routes/tools/[tool]/+page.svelte +++ b/src/routes/tools/[tool]/+page.svelte @@ -13,13 +13,14 @@ import { goto } from '$app/navigation'; import Picker from '$lib/Tools/Picker.svelte'; import Likes from '$lib/Tools/Likes.svelte'; + import root from '$lib/Utility/root.js'; export let data; let tool = data.tool ?? 'default'; onMount(() => { - if (tool === 'default') goto('/tools'); + if (tool === 'default') goto(root('/tools')); }); $: suggestion = closest(tool, Object.keys(tools)); @@ -35,7 +36,7 @@ <blockquote style="margin: 0 0 0 1.5rem;"> Did you mean "<a - href={`/tools/${tools[suggestion].id}`} + href={root(`/tools/${tools[suggestion].id}`)} on:click={() => (tool = suggestion)} style={suggestion === '...' ? 'pointer-events: none; color: inherit;' : ''} > |